package org.jsola.contract.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.contract.dto.*;
import org.jsola.contract.vo.ContractVO;
import org.jsola.core.Result;

import java.util.List;

/**
 * @author JanusMix
 */
@Api(tags = "contract-签署")
public interface ISignControllerAPI {

    @ApiOperation(value = "发起模板签署")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "publishSignDTO", dataType = "PublishSignDTO", value = "发起模板签署对象", paramType = "body")
    })
    Result<List<ContractVO>> publishTemplateSign(PublishSignDTO publishSignDTO);

    @ApiOperation(value = "个人签署方签署")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "personSignDTO", dataType = "PersonSignDTO", value = "个人签署对象", paramType = "body"),
    })
    Result<String> personSign(PersonSignDTO personSignDTO);

    @ApiOperation(value = "企业签署方签署")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterpriseSignDTO", dataType = "EnterpriseSignDTO", value = "企业签署对象", paramType = "body"),
    })
    Result<String> enterpriseSign(EnterpriseSignDTO enterpriseSignDTO);

    @ApiOperation(value = "企业签署方签署(华杰专用),需要重新发起的合同会重新发起并打上合同终止时间")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterpriseSignDTO", dataType = "EnterpriseSignDTO", value = "企业签署对象", paramType = "body"),
    })
    Result<String> enterpriseSignAgain(EnterpriseSignDTO enterpriseSignDTO);

    @ApiOperation(value = "批量发起合同")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterpriseSignDTO", dataType = "EnterpriseSignDTO", value = "企业签署对象", paramType = "body"),
    })
    Result<String> enterpriseSignAgainBatch(EnterpriseSignDTO enterpriseSignDTO);

    @ApiOperation(value = "个人签署发送验证码")
    Result<Boolean> sendCode();

    @ApiOperation(value = "公司根据上传的word签署")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "publishSignDTO", dataType = "PublishWordCompanySignDTO", value = "发起模板签署对象", paramType = "body")
    })
    Result<String> wordSignCompany(PublishWordCompanySignDTO publishWordCompanySignDTO);

    @ApiOperation(value = "个人根据上传的word签署")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "publishWordPeopleSignDTO", dataType = "PublishWordPeopleSignDTO", value = "根据上传的word个人签署对象", paramType = "body")
    })
    Result<String> wordSignPeople(PublishWordPeopleSignDTO publishWordPeopleSignDTO);
}
